package com.freesky.biz.activity.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.freesky.common.annotation.Excel;
import com.freesky.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 立减金券码监控
 */
@Data
@ContentRowHeight(22)
@ColumnWidth(25)
@HeadRowHeight(25)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)//表头样式
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)
public class TStockMonitor implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    private String projectName;

    @ExcelIgnore
    private String projectId;

    @ExcelProperty("商户平台")
    private String mchName;

    @ExcelProperty("批次号")
    private String id;

    @ExcelProperty("活动名称")
    private String stockName;

    @ExcelIgnore
    private String mchId;

    @ColumnWidth(12)
    @ExcelProperty("总预算")
    private String maxAmount;

    @ColumnWidth(12)
    @ExcelProperty("发放比例")
    private String grantRadio;

    //【发放总上限】 最大发券数
    @ColumnWidth(15)
    @ExcelProperty("发放总上限")
    private String totalCount;

    @ColumnWidth(15)
    @ExcelProperty("已发券的数量")
    private String grantCount;

    @ExcelProperty("活动状态")
    private String status;

    @ExcelProperty("活动开始时间")
    private String beginTime;

    @ExcelProperty("活动结束时间")
    private String endTime;

    @ExcelProperty("活动类型")
    private String stockType;

    @ColumnWidth(15)
    @ExcelProperty("核销订单金额")
    private Double usedOrderMoney;

    @ColumnWidth(15)
    @ExcelProperty("核销笔数")
    private Long usedCount;

    @ColumnWidth(15)
    @ExcelProperty("核销金额")
    private Double usedAmount;

    @ColumnWidth(15)
    @ExcelProperty("报账金额（元）")
    private Double expenseAmount;

    @ColumnWidth(15)
    @ExcelProperty("退款笔数")
    private Long refundCount;

    @ColumnWidth(15)
    @ExcelProperty("退款金额")
    private Double refundAmount;

    @ColumnWidth(15)
    @ExcelProperty("退款订单金额")
    private Double refundOrderMoney;

    @ExcelProperty("单天发放上限金额")
    private String maxAmountByDay;

    @ExcelProperty("单个用户可领个数")
    private String maxCouponsPerUser;

    @ExcelProperty("券类型")
    private String couponType;

    @ExcelProperty("券的面额")
    private String couponAmount;

    @ExcelProperty("门槛")
    private String transactionMnimum;


    @ColumnWidth(12)
    @ExcelProperty("纳入监控")
    private String alarmFlag;

    @ExcelIgnore
    private Integer expireDays;

    @ExcelIgnore
    private String deptId;

    @ExcelIgnore
    private String activeTime;

    @ExcelIgnore
    private String stopTime;

    @ExcelIgnore
    private String singlePriceMax;

    @ExcelIgnore
    private String cutToPrice;

    @ExcelIgnore
    private String alarmCount;

    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    //查询参数
    @ExcelIgnore
    private String alarmStatus;

    @ExcelIgnore
    private String remarks;

    @ExcelIgnore
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params)
    {
        this.params = params;
    }
}
